package com.aaa.controller;

import com.aaa.entity.User;
import com.aaa.service.UserService;
import com.aaa.service.impl.UserServiceImpl;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RequestMapping("user")
@RestController
public class UserController {

    @Resource
    private UserService userService;

    @RequestMapping("query")
    public PageInfo<User> query(String uname,String phone,Integer pageNum,Integer pageSize){
        return userService.query(uname,phone,pageNum,pageSize);
    }

    @RequestMapping("updateState")
    public Integer updateState(Integer id,String state){
        return userService.updateState(id,state);
    }
}
